package com.mms.action.meeting;

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

import com.mms.dao.MeetingManagementDao;
import com.mms.entity.Meeting;
import com.mms.entity.MeetingRoom;
import com.mms.entity.Staff;
import com.opensymphony.xwork2.Action;

public class DeleteMeetingAction implements Action{

	private int startPage;
	List<Meeting> meetingMes;
	private int account;
	private String meTopic;
	
	public int getStartPage() {
		return startPage;
	}

	public void setStartPage(int startPage) {
		this.startPage = startPage;
	}

	public List<Meeting> getMeetingMes() {
		return meetingMes;
	}

	public void setMeetingMes(List<Meeting> meetingMes) {
		this.meetingMes = meetingMes;
	}

	public int getAccount() {
		return account;
	}

	public void setAccount(int account) {
		this.account = account;
	}

	public String getMeTopic() {
		return meTopic;
	}

	public void setMeTopic(String meTopic) {
		this.meTopic = meTopic;
	}

	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		MeetingManagementDao mmd = new MeetingManagementDao();
		Meeting meeting = new Meeting();
		MeetingRoom meetingRoom = new MeetingRoom();
		Staff staff = new Staff();
		meetingRoom.setMrId(1);
		staff.setSId(1);
		meeting.setMeetingRoom(meetingRoom);
		meeting.setStaff(staff);
		meeting.setTopic(meTopic);
		mmd.deleteMeeting(meeting);
		meetingMes = mmd.getMeetingMes(startPage);
		account = mmd.getcount();
		return "success";
	}

	
}
